package com.ap.core.common.types;

/**
 * User: Gibu.Paul
 * RefundReason Type
 */
public enum RefundReasonType {
	
	

	DUPLICATEORDER("DUPLICATEORDER", true),
	GOODSRETURNED("GOODSRETURNED",true),
	ORDERCANCELLED("ORDERCANCELLED",true),
	MERCHANTOUTOFSTOCK("MERCHANTOUTOFSTOCK",true),
	GOODSNOTRECV("GOODSNOTRECV",true),
	LATECONFIRMATION("LATECONFIRMATION",true),
	DISPUTES("DISPUTES",false);
	
    private String reasonType;
	private boolean isMerchantInitiated;

    private  RefundReasonType(String refundReason,boolean isMerchantInitiated) {
        this.reasonType = refundReason;
        this.isMerchantInitiated = isMerchantInitiated;
    }


    public static RefundReasonType getValueOf(String refundReason) {
        for (RefundReasonType refundReasonType : values()) {
        	if (refundReasonType.getReasonType().equalsIgnoreCase(refundReason)) {
                return refundReasonType;
            }
        }
        return null;  
      }


	public String getReasonType() {
		return reasonType;
	}


	public boolean isMerchantInitiated() {
		return isMerchantInitiated;
	} 
    
    

}
